using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;

namespace Newtonsoft.Json.Schema
{
	public class JsonSchemaResolver
	{
		[CompilerGenerated]
		private sealed class Class125
		{
			public string string_0;

			public bool method_0(JsonSchema jsonSchema_0)
			{
				return string.Equals(jsonSchema_0.Id, string_0, StringComparison.Ordinal);
			}

			public bool method_1(JsonSchema jsonSchema_0)
			{
				return string.Equals(jsonSchema_0.String_0, string_0, StringComparison.Ordinal);
			}
		}

		[CompilerGenerated]
		private IList<JsonSchema> ilist_0;

		public IList<JsonSchema> LoadedSchemas
		{
			[CompilerGenerated]
			get
			{
				return ilist_0;
			}
			[CompilerGenerated]
			protected set
			{
				ilist_0 = value;
			}
		}

		public JsonSchemaResolver()
		{
			LoadedSchemas = new List<JsonSchema>();
		}

		public virtual JsonSchema GetSchema(string reference)
		{
			JsonSchema jsonSchema = LoadedSchemas.SingleOrDefault((JsonSchema jsonSchema_0) => string.Equals(jsonSchema_0.Id, reference, StringComparison.Ordinal));
			if (jsonSchema == null)
			{
				jsonSchema = LoadedSchemas.SingleOrDefault((JsonSchema jsonSchema_0) => string.Equals(jsonSchema_0.String_0, reference, StringComparison.Ordinal));
			}
			return jsonSchema;
		}
	}
}
